package exceptionTest;

import java.util.Map;

public class ServiceException extends Exception {
	
	/**
	 * 服务集合
	 */
	private int code = 1;
	
	private String errorMessage=null;
	
	public ServiceException() {
        super();
    }


    public ServiceException(String message) {
        super(message);
        this.errorMessage=message;
    }
    
    public ServiceException(int code, String message) {
        super(message);
        this.code=code;
        this.errorMessage=message;
    }
    
    public void setCode(int code){
    	this.code=code;
    }
    
    public int getCode(){
    	return this.code;
    }
    
    public void setMessage(String message){
    	this.errorMessage=message;
    }
    
    @Override
    public String getMessage(){
    	return this.errorMessage;
    }
}
